cmake_minimum_required(VERSION 2.8.12)

project(uhp LANGUAGES C CXX)

set(CMAKE_C_STANDARD 99)





add_library( uhp_api SHARED
    uhp_api.cpp
)
add_executable( uhp
    app.cpp
    client.cpp
    comm.cpp
    config.cpp
    env.cpp
    IDL_httpserver_conf.dsc.c
    IDL_httpserver_conf.dsc.LOG.c
    main.cpp
    monitor.cpp
    worker.cpp
)


target_include_directories(uhp_api PUBLIC ${PROJECT_ROOT_DIR}/src/uhp) 
target_link_libraries(uhp_api PRIVATE  uhp_util )
target_link_libraries(uhp PRIVATE uhp_api uhp_mysql uhp_util pthread ssl dl)

install(TARGETS uhp_api DESTINATION lib)
install(TARGETS uhp DESTINATION bin)